/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2022-11-12
 * Time: 14:25
 */
public class Person {
    String name;
    String gender;
    int age;

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                '}';
    }

    public Person(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }
    public static void main(String[] args) {
        Person person = new Person("Jim","男", 18);
        System.out.println(person);
    }
}
// 打印结果：Person{name='Jim', gender='男', age=18}



